package elect;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

public class Cha {
	String[] str = new String[52];
	int n = 0;
	public static  int[] num = new int[52];
	public Cha() {
		for(int j = 0;j<52;j++) {
			str[j] = "";
			num[j] = 0;
		}
		
		File fp=new File("src/electboy.txt");
		InputStream i=null;
		try {
			i=new FileInputStream(fp);
			//fp可能为空
			int temp;
			while((temp=i.read())!=-1) {
				if((char)temp == '/') {
					n++;
				}else {
					str[n] = str[n]+(char)temp;
				}
			}
		for(int j = 1;j<=52;j++) {
			for(int k = 1;k<=52;k++) {
				if(str[k-1].equals(""+j)) {
					num[j-1]++;
				}
			}
		}	

		}catch(Exception e) {	
			e.printStackTrace();
		}finally {
			try {
				i.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}
}
